{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "53a834ef",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Hello, World!\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "False"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "print(\"Hello, World!\")\n",
    "str = \"2025-01-01\"\n",
    "str1 = \"2025-01-02\"\n",
    "str > str1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "dac51f82",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'int'>\n",
      "<class 'float'>\n",
      "<class 'float'>\n"
     ]
    }
   ],
   "source": [
    "param1 = 12\n",
    "param2 = 12.12\n",
    "print(type(param1))\n",
    "print(type(param2))\n",
    "\n",
    "param3 = param1 + param2\n",
    "print(type(param3))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "69f22d25",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "日期是：2025-01-01\n"
     ]
    }
   ],
   "source": [
    "str1 = \"2025-01-01\"\n",
    "str2 = '2025-01-02'\n",
    "str3 = \"\"\"    LLM --> GPT[GPT系列]\n",
    "    LLM --> BERT[BERT系列]\n",
    "    LLM --> ChatGPT[ChatGPT系列]\n",
    "    LLM --> Claude[Claude系列]\n",
    "    \"\"\"\n",
    "str4 = f\"日期是：{str1}\"\n",
    "print(str4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "a6c77f9a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'int'>\n",
      "<class 'int'>\n",
      "<class 'float'>\n",
      "3.3333333333333335\n"
     ]
    }
   ],
   "source": [
    "p1 = 10\n",
    "p2 = 3\n",
    "print(type(p1))\n",
    "print(type(p2))\n",
    "p3 = p1 / p2\n",
    "print(type(p3))\n",
    "print(p3)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "79584f30",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Hello, Alice!\n",
      "8\n",
      "202508\n"
     ]
    }
   ],
   "source": [
    "def greet(name):  \n",
    "    print(\"Hello, \" + name + \"!\")\n",
    "greet(\"Alice\")\n",
    "def add(a, b):  \n",
    "    return a + b    \n",
    "print(add(3, 5))\n",
    "print(add('2025', '08'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "439e1625",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Person Alice is being created.\n",
      "Person Alice is being deleted.\n",
      "say_hello::Hello, my name is Alice and I am 20 years old.\n",
      "greet::Hello, my name is Alice and I am 20 years old.\n",
      "Alice\n",
      "Person Alice is being deleted.\n"
     ]
    }
   ],
   "source": [
    "class Person:\n",
    "    person_name = None\n",
    "    person_age = None\n",
    "    def __init__(self, name, age):\n",
    "        print(f\"Person {name} is being created.\")\n",
    "        self.person_name = name\n",
    "        self.person_age = age\n",
    "    def __del__(self):\n",
    "        print(f\"Person {self.person_name} is being deleted.\")\n",
    "    def say_hello(self):\n",
    "        print(f\"say_hello::Hello, my name is {self.person_name} and I am {self.person_age} years old.\")\n",
    "    def greet(self):\n",
    "        self.say_hello()\n",
    "        print(f\"greet::Hello, my name is {self.person_name} and I am {self.person_age} years old.\")\n",
    "\n",
    "p1 = Person(\"Alice\", 20)\n",
    "p1.greet()\n",
    "print(p1.person_name)\n",
    "p1 = None"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "252c8262",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": ".venv",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
